package cn.stylefeng.guns.modular.quan.mapper;

import cn.stylefeng.guns.modular.quan.entity.CouponCode;
import cn.stylefeng.guns.modular.quan.model.params.CouponCodeParam;
import cn.stylefeng.guns.modular.quan.model.result.CouponCodeResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Dong
 * @since 2023-10-31
 */
public interface CouponCodeMapper extends BaseMapper<CouponCode> {

    /**
     * 获取列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    List<CouponCodeResult> customList(@Param("paramCondition") CouponCodeParam paramCondition);

    /**
     * 获取map列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") CouponCodeParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    Page<CouponCodeResult> customPageList(@Param("page") Page page, @Param("paramCondition") CouponCodeParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CouponCodeParam paramCondition);

    int jianquan(@Param("couponId") Long couponId, @Param("couponCode") String couponCode);
}
